package model;

import strategy.BulletMoveStrategy;
import strategy.StraightMoveStrategy;

public class Bullet {
    private int x, y;
    private BulletMoveStrategy moveStrategy;

    public Bullet(int x, int y) {
        this.x = x;
        this.y = y;
        this.moveStrategy = new StraightMoveStrategy();
    }

    public void move() {
        moveStrategy.move(this);
    }

    // 添加 getter 和 setter 方法
    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }
}